package cn.findviewbydream.entity;

import lombok.*;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import java.util.Date;

/**********************************
 * 工程：cn.findviewbydream.entity
 * 作者：白雨濃 evil
 * 时间：17-6-2 下午1:42
 * 邮箱：evilbai@foxmail.com
 * 内容：贴子实体类
 **********************************/
@Data
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class PostEntity
{
    int postId;

    @NotEmpty(message = "标题不得为空")
    @Length(max = 50, message = "标题长度不得超过50个字符")
    private String title;

    private String content;
    private UserEntity author;
    private Date pubDate;
}
